package com.woniuxy.tools;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

public class MD5Tools {

	
	public static String getMD5String(ByteSource salt,String password){
		String algorithmName="MD5";
		
		
		int hashIterations=1024;
		Object result=new SimpleHash(algorithmName,password,salt,hashIterations);
		
		return result.toString();
		
	}
	
	public static void main(String[] args) {
		ByteSource salt=ByteSource.Util.bytes("admin");
		System.out.println(getMD5String(salt,"123456"));
		
	}
}
